package com.jzr.medical.controller.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jzr.common.entity.vo.Result;
import com.jzr.medical.db1.service.PdaPageService;
import com.jzr.medical.db1.vo.PdaPageVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/pdaPage")
public class PdaPageController {
    @Autowired
    private PdaPageService pdaPageService;

    @GetMapping("/list")
    public Result<List<PdaPageVo>> list(PdaPageVo record){
        QueryWrapper<PdaPageVo> qw = new QueryWrapper<>();

        List<PdaPageVo> list = pdaPageService.list(qw);
        return Result.success("成功",list);
    }
    @PostMapping("/saveBatch")
    public Result<List<PdaPageVo>> saveBatch(@RequestBody List<PdaPageVo> list){
        List<PdaPageVo>  result = pdaPageService.saveBatch(list);
        return Result.success("成功",result);
    }
}
